package com.kuang.demo.controller.wx;

import com.kuang.demo.bean.BaseRespVo;
import com.kuang.demo.service.RegionService;
import com.kuang.demo.vo.wx.WxQueryRegionListByIdVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.Lifecycle;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("wx/region")
public class WxRegionController {

    @Autowired
    RegionService regionService;
    @RequestMapping("list")
    public BaseRespVo list(int pid){

        List<WxQueryRegionListByIdVO> wxQueryRegionListByIdVOList =  regionService.getListByPid(pid);
        return BaseRespVo.ok(wxQueryRegionListByIdVOList);
    }

}
